-
Notifications
You must be signed in to change notification settings - Fork 976
Clean up basic_string
class reference
#5689
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Clean up basic_string
class reference
#5689
Conversation
…ng` class reference
@Rageking8 : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change. |
Learn Build status updates of commit a81ce6c: ✅ Validation status: passed
For more details, please refer to the build report. |
Can you review the proposed changes? Important: When the changes are ready for publication, adding a #label:"aq-pr-triaged" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR cleans up the documentation for the basic_string
class reference by making various editorial improvements and corrections. The changes focus on improving consistency, fixing typos, and ensuring proper formatting.
Key changes:
- Title case corrections and template parameter section renaming
- Fixed incorrect return types and missing punctuation in code documentation
- Formatting improvements with backticks and typo corrections
// The second member function assigning a specific | ||
// number of the of characters a C-string to a string | ||
// number of the characters of a C-string to a string |
Copilot
AI
Sep 24, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a grammatical error in the comment. "number of the characters" should be "number of characters" - remove the extra "the".
// number of the characters of a C-string to a string | |
// number of characters of a C-string to a string |
Copilot uses AI. Check for mistakes.
`operator[]` is faster than the member function [`at`](#at) for providing read and write access to the elements of a string. | ||
|
||
`operator[]` doesn't check whether the index passed as a parameter is valid, but the member function `at` does and so should be used in the validity isn't certain. An invalid index (an index less that zero or greater than or equal to the size of the string) passed to the member function `at` throws an [`out_of_range` Class](../standard-library/out-of-range-class.md) exception. An invalid index passed to `operator[]` results in undefined behavior, but the index equal to the length of the string is a valid index for const strings and the operator returns the null character when passed this index. | ||
`operator[]` doesn't check whether the index passed as a parameter is valid, but the member function `at` does and so should be used if the validity isn't certain. An invalid index (an index less than zero or greater than or equal to the size of the string) passed to the member function `at` throws an [`out_of_range` Class](out-of-range-class.md) exception. An invalid index passed to `operator[]` results in undefined behavior, but the index equal to the length of the string is a valid index for const strings and the operator returns the null character when passed this index. |
Copilot
AI
Sep 24, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a grammatical error. "less that zero" should be "less than zero".
Copilot uses AI. Check for mistakes.
compare